<?php
function loadView($v = array(), $data = null)
{
    if($data) extract($data);
    
    if(is_array($v))
    {
        foreach ($v as $i)
        {
            $fileName = BASE_DIR. '/views/' . $i . '.php';
            
            if(!file_exists($fileName)) echo 'Fail';
            else
            include $fileName;
        }
    }
    else
    {
        include BASE_DIR . '/views/' . $v . '.php';
    }
}
?>